package ca.etsmtl.log430.lab2.gestion;
import ca.etsmtl.log430.lab2.donnee.bean.TeacherBean;
import ca.etsmtl.log430.lab2.gestion.*;
public class TeacherBuilder {
	
	private  ITeacherAssignment controller;
	
	public TeacherBuilder(ITeacherAssignment controller) {
		super();
		this.controller = controller;
	}

	/**
	 * 
	 * @param bean
	 * @return
	 */
	public  Teacher build(TeacherBean bean)
	{
		Teacher t = new Teacher(
				bean.getLastName(),
				bean.getFirstName(),
				bean.getTeacherID(),
				TeacherType.valueOf(bean.getType()),
				controller);
		return t;
	}

}
